/*
 * Creation : 27/09/2013
 */
/**
 * 
 */
package com.japcatalog.service.impl;

import java.util.Collection;

import com.japcatalog.dao.CatalogObjectDao;
import com.japcatalog.dao.impl.CatalogObjectDaoImpl;
import com.japcatalog.model.CatalogObject;
import com.japcatalog.service.CatalogObjectService;

/**
 * The Class CatalogObjectServiceImpl.
 * 
 * @author Fernando Ariel Perelli
 */
public class CatalogObjectServiceImpl implements CatalogObjectService {

	/** The catalog object dao. */
	private CatalogObjectDao catalogObjectDao = new CatalogObjectDaoImpl();

	/**
	 * Getter catalogObjectDao.
	 * 
	 * @return the catalogObjectDao
	 */
	public CatalogObjectDao getCatalogObjectDao() {
		return catalogObjectDao;
	}

	/**
	 * Setter catalogObjectDao.
	 * 
	 * @param catalogObjectDao
	 *            the catalogObjectDao to set
	 */
	public void setCatalogObjectDao(CatalogObjectDao catalogObjectDao) {
		this.catalogObjectDao = catalogObjectDao;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#findById(java.lang.Long)
	 */
	@Override
	public CatalogObject findById(Long id) {
		return this.catalogObjectDao.findById(id);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#findALL()
	 */
	@Override
	public Collection<CatalogObject> findALL() {
		return this.catalogObjectDao.findAll();
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#create(com.japcatalog.model.CatalogObject)
	 */
	@Override
	public Long create(CatalogObject catalogObject) {
		return this.catalogObjectDao.create(catalogObject);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#update(com.japcatalog.model.CatalogObject)
	 */
	@Override
	public void update(CatalogObject catalogObject) {
		this.catalogObjectDao.update(catalogObject);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#delete(com.japcatalog.model.CatalogObject)
	 */
	@Override
	public void delete(CatalogObject catalogObject) {
		this.catalogObjectDao.delete(catalogObject);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogObjectService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		this.catalogObjectDao.delete(id);
	}

}
